﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template.Master" AutoEventWireup="true" CodeBehind="QuanLyTaiKhoan.aspx.cs" Inherits="FastDeal.QuanLyTaiKhoan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <div align="center">
            <asp:Label ID="Label1" runat="server" CssClass="header" 
        Text="QUẢN LÝ TÀI KHOẢN THÀNH VIÊN"></asp:Label>
            <br />
    <br />
    <asp:GridView ID="gvDSTaiKhoan1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" 
        Height="212px" onselectedindexchanged="GridView1_SelectedIndexChanged" 
        Width="534px" DataKeyNames="UserName" 
        onrowcancelingedit="gvDSTaiKhoan_RowCancelingEdit" 
        onrowdeleting="gvDSTaiKhoan_RowDeleting" onrowediting="gvDSTaiKhoan_RowEditing" 
        onrowupdating="gvDSTaiKhoan_RowUpdating" BackColor="White" 
        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px">
        <Columns>
            <asp:TemplateField HeaderText="UserName">
                <EditItemTemplate>
                    <asp:Label ID="lbUser" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Email">
                <EditItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lbEmail" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Trạng Thái">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlTrangThai" runat="server">
                        <asp:ListItem Value="1">Active</asp:ListItem>
                        <asp:ListItem Value="2">Banned</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblTrangThai" runat="server" Text='<%# Bind("TrangThai") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Quyền">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlQuyen" runat="server">
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblQuyen" runat="server" Text='<%# Bind("TenLoaiThanhVien") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="300px" />
            </asp:TemplateField>
            <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Image/Delete.png" 
                ShowDeleteButton="True" >
            <ItemStyle Width="50px" />
            </asp:CommandField>
            <asp:CommandField ButtonType="Image" CancelImageUrl="~/Image/cancel.png" 
                EditImageUrl="~/Image/edit.jpg" ShowEditButton="True" 
                UpdateImageUrl="~/Image/update.png" >
            <ItemStyle Width="50px" />
            </asp:CommandField>
        </Columns>
        <EmptyDataTemplate>
            <asp:HyperLink ID="HyperLink1" runat="server" 
                NavigateUrl='<%# "ThongTinTaiKhoan.aspx?ID=" + Eval("ID") %>' 
                Text='<%# Eval("UserName") %>'></asp:HyperLink>
        </EmptyDataTemplate>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <SortedAscendingCellStyle BackColor="#EDF6F6" />
        <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
        <SortedDescendingCellStyle BackColor="#D6DFDF" />
        <SortedDescendingHeaderStyle BackColor="#002876" />
    </asp:GridView>
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnThem" runat="server" CssClass="green button" 
                ForeColor="#FF9900" onclick="Button1_Click" SkinID="button" 
        Text="Thêm Doanh Nghiệp Mới" Height="32px" Width="167px" />
            <br />
            <asp:HyperLink ID="linkQuayLai" runat="server" 
                NavigateUrl="~/Admin/Default.aspx">QUAY LẠI</asp:HyperLink>
    <br />
    <%-- <asp:SqlDataSource ID="ThongTinTaiKhoan" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DBBanHangConnectionString %>" 
        SelectCommand="SELECT [UserID], [HoTen], [Nickname], [DiaChi], [DienThoai], [CMND], [GhiChu] FROM [ThongTinTaiKhoan] WHERE ([isDelete] = @isDelete) ORDER BY [UserID]">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="isDelete" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DBBanHangConnectionString %>" 
        SelectCommand="SELECT [UserID], [UserName], [MaLoaiThanhVien], [TrangThai], [Email], [HoatDongCuoiCung] FROM [TaiKhoan] WHERE ([isDelete] = @isDelete) ORDER BY [UserID], [UserName], [Email]">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="isDelete" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>--%>
        
        </div>
    </asp:Panel>
</asp:Content>
